<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/IncludeTop.jsp" %>
<% 
	String indexurl = "";
	String role = (String)request.getAttribute("role");
	if(role != null)indexurl = role + "/index.do";
	else indexurl = "common/index.do";
%>
<!------------------------------------------>
<html:html locale="true">

<head>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.form.js"></script>
	<link rel="stylesheet" type="text/css" href="css/bet.css"/>
</head>

<body>

<div id="header">标题内容</div>

<div id="contain">
	<div id="mainbg">
	
		<div id="right">
			<div class="maincontent">内容</div>
		</div>
		
		<div id="left">
			<div class="leftindex">功能列表<br>索引<br>index</div>
		</div>
		
		<div id="betbox" />
		
	</div>
</div>

<div id="footer">footer</div>

<script language="javascript" type="text/javascript">
/*	$.get("<%=indexurl%>", function(data){$("div.leftindex").html(data);})*/
	$.get("mgr/index.do", function(data){$("div.leftindex").html(data);})
	
	function loadcontent(url)
	{
		$.get(url, function(data){
			$("div.maincontent").html(data);
			$.each($("div.maincontent//a"), function(i, a){
				var ahref = a.attributes["href"];
				ahref.value = "javascript:loadcontent('" + ahref.value + "')";
			});
		});
		
	}
	function getuserlist()
	{
		var url = "mgr/listuser.do?page=" + $("input#page4listuser").attr("value");
		loadcontent(url);
	}
	function getcomplist()
	{
		var url = "mgr/competitionlist.do?page=" + $("input#page4listcomp").attr("value");
		loadcontent(url);
	}
	function getoddslist()
	{
		var url = "common/listodds.do?page=" + $("input#page4listodds").attr("value");
		loadcontent(url);
	}
	function loadodds()
	{
		var rndm = Math.random();
		$.get("common/listodds.do?"+rndm, function(data){
			$("div.maincontent").html(data);
		});
	}
	function tobet(url)
	{
		$.get(url, function(data){
			$("#betbox").html(data);
		});
	}
	function confirmbet(url){
		var betamount = $("input[@name='amount']").attr("value")
		$.get(url + "&amount=" + betamount, function(data){
			$("div.maincontent").html(data);})}
</script>

</body>

</html:html>
<!------------------------------------------>
<%@ include file="/WEB-INF/jsp/IncludeBottom.jsp" %>